<style >
    .overlay{
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom:  0;
        background: rgba(0, 0, 0, .5);
    }
    .dialog{ 
        position: absolute; 
        top: 50%;
        left: 50%;
        transform: translate(-50%,-50%);
        width: 50%;
    }
</style>
<!--引用外部样式-->
<!-- <link href="/example/mobile/out.css"/> -->
<template>
    <div class="overlay" v-show="open" @click="open=false;">
        <div class="dialog" @click.stop>
            <div class="alert alert-info" role="alert">动态加载了一个弹窗DOM，在body末尾append，需要手动关闭，否则不会移除！</div>
        </div>
    </div>
</template>
<script>
//这里定义组件
Rap.define({
    data: function(){
        return {
            open: false
        }
    },
    created:function () {

    },
    init:function () {
    },
    methods:{

    }
})
</script>